Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable building with GCC 14 #15

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

kyllingstad
Copy link
Member

When I tried to build the package with GCC 14, I got the following error:

src/ThirdParty/Minizip/minizip/miniunz.c:141:11: error: implicit declaration of function ‘mkdir’; did you mean ‘mymkdir’? [-Wimplicit-function-declaration]

It turns out that GCC now conforms more strictly to the C standard, and some issues that were previously only warned about are now treated as errors. implicit-function-declaration is one of these. For more info, see: https://gcc.gnu.org/gcc-14/porting_to.html#implicit-function-declaration

The solution is to patch the Minizip code so that the appropriate header for mkdir(), which is <sys/stat.h>, gets included.

When I tried to build the package with GCC 14, I got the following
error:

    src/ThirdParty/Minizip/minizip/miniunz.c:141:11: error:
    implicit declaration of function ‘mkdir’; did you mean ‘mymkdir’?
    [-Wimplicit-function-declaration]

It turns out that GCC now conforms more strictly to the C standard, and
some issues that were previously only warned about are now treated as
errors.  `implicit-function-declaration` is one of these.  For more
info, see:
https://gcc.gnu.org/gcc-14/porting_to.html#implicit-function-declaration

The solution is to patch the Minizip code so that the appropriate header
for `mkdir()`, which is `<sys/stat.h>`, gets included.
@kyllingstad kyllingstad added the bug Something isn't working label Jun 10, 2024
@kyllingstad kyllingstad self-assigned this Jun 10, 2024
Copy link

@joakimono joakimono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@kyllingstad kyllingstad merged commit 5aa200a into master Jun 11, 2024
12 checks passed
@kyllingstad kyllingstad deleted the feature/enable-compilation-with-gcc14 branch June 11, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants